from auto.apiSecurity.common.addApiNone import add_api_none
from auto.apiSecurity.common.addService import add_service
from auto.apiSecurity.common.basic import check_target_project, check_deploy_env, check_directory, check_service_id
from auto.apiSecurity.common.login import login_keep_token
import re

# 配置环境变量
env = "poc"
project = "RISK"
deploy_name = "c1"
csv_file = "data/config/csv/test.csv"
mock_service_name = "Mock"
host = "192.168.6.72"
port = "8000"
weight = "100"

login_keep_token(env)
check_target_project(env, project)
check_deploy_env(env, deploy_name)
add_service(env, project, host=host, port=port, weight=weight)
check_service_id(env, mock_service_name)
check_directory(env)
add_api_none(env, csv_file)
